package Stack;

/**
 * Created by sunwei on 2017/10/10
 * Time:9:49
 */
public class LinkStackApp {
    public static void main(String[] args) {
        LinkStack linkStack = new LinkStack();
        /*
        入栈操作
         */
        linkStack.push(3.00);
        linkStack.push(4.00);
        System.out.println("新添加了两个元素：");
        linkStack.displayStack();
        linkStack.push(5.00);
        linkStack.push(6.00);
        System.out.println("新添加了两个元素：");
        linkStack.displayStack();
        linkStack.push(77.00);
        linkStack.push(88.00);
        System.out.println("新添加了两个元素：");
        linkStack.displayStack();

        /*
        遍历显示栈
         */
        System.out.println("此时栈里面的元素为：");
        linkStack.displayStack();

        /*
        出栈操作,一次只能出栈一个元素
         */
        linkStack.pop();
        linkStack.pop();
        linkStack.displayStack();
    }
}
